package ManageGameHServer.bean;

import ManageGameHServer.classFile.Mmd5;
import ManageGameHServer.conf.Setup;

public class MessageBody {
    private int Ctime;//时间戳
    private String sign;//数字签名
    private String content;//发送的内容
    private int doing=0;
    public void setDoing(int doing) {
		this.doing = doing;
	}
    public int getDoing() {
		return doing;
	}	
    public MessageBody() {
	}
    
	public MessageBody(int ctime) {
		Ctime = ctime;
	}

	@Override
	public String toString() {
		return "MessageBody [Ctime=" + Ctime + ", sign=" + sign + ", content=" + content + "]";
	}

	public int getCtime() {
		return Ctime;
	}
	public void setCtime(int ctime) {
		Ctime = ctime;
	}
	public void setSign(String sign) {
		
		this.sign = sign;
	}
	public String getSign() {
		String serverKey=Setup.serverUnid;
		String clientIP=Setup.homeUrl;
		String mysign=Mmd5.createString(serverKey.substring(5, 12)+clientIP+Ctime+serverKey);
		System.out.println(serverKey+"------------"+clientIP+"------------"+Ctime);
		return mysign;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}

    
}
